From 5f3962e6e2e62ca699f02395ed505ef758445d56 Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 1 Nov 2004 17:37:16 +0000 Subject: [PATCH] Let xstrdup clone null strings into empty strings. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@982 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpsbabel/util.c b/gpsbabel/util.c index 975b7598f..c58520ac0 100644 --- a/gpsbabel/util.c +++ b/gpsbabel/util.c @@ -121,7 +121,7 @@ XSTRDUP(const char *s, DEBUG_PARAMS ) xstrdup(const char *s) #endif { - char *o = strdup(s); + char *o = s ? strdup(s) : strdup(""); #ifdef DEBUG_MEM debug_mem_output( "strdup, %x, %x, %s, %d\n", o, s, file, line ); -- 2.30.2